import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/views/HelloWorld'
import Panel from '@/views/Home'
import Project from '@/views/Project'
import Budget from '@/views/Budget'
import Management from '@/views/Management'
import Distribution from '@/views/Distribution'
import Staff from '@/views/Staff'
import CarCost from '@/views/CarCost'
import ProjectCost from '@/views/ProjectCost'
import Quality from '@/views/QualityCoefficient'
import Login  from '@/views/Login'
import Detail from '@/views/ProjectDetail'
import DistributionDetail from '@/views/DistributionDetail'
import Notfund from '@/views/404'
import Setting from '@/views/Setting'
import Bonus from '@/views/Bonus'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: Hello,
      children:[
        {
          path: '/panel',
          name: 'Panel',
          component: Panel,
          children:[
            {
              path:'project',
              name:'Project',
              component: Project,
              children:[
                {
                  path:'bonus', //奖金报表
                  name:'Bonus',
                  component:Bonus,
                },
                {
                  path:'management', //项目管理
                  name:'Management',
                  component:Management,
                },
                {
                  path:'detail', //项目详情
                  name:'Detail',
                  component:Detail
                },
                {
                  path:'car',   // 用车成本
                  name:'CarCost',
                  component:CarCost
                },
                {
                  path:'cost',   // 项目成本
                  name:'ProjectCost',
                  component:ProjectCost
                },
                {
                  path:'quality',   // 质量系数
                  name:'Quality',
                  component:Quality
                },
                {
                  path:'distributiondetail', // 产值分配
                  name:'DistributionDetail',
                  component:DistributionDetail
                },
                {
                  path:'distribution', // 产值分配
                  name:'Distribution',
                  component:Distribution
                },
                {
                  path:'staff', // 人员管理
                  name:'Staff',
                  component:Staff
                },
                {
                  path:'setting', // 其他设置
                  name:'Setting',
                  component:Setting
                }
              ]
            },
            {
              path:'budget', // 预算
              name:'Budget',
              component:Budget
            },
          ]
        },
        {
          path:'login', // 登录
          name:'Login',
          component:Login
        }
      ]
    },
    {
      path: '*',
      name: 'notfund',
      component: Notfund
    }
  ]
})
